package com.caomt.dubboconsumertest;

import com.caomt.dubbo.service.api.DemoService;
import com.caomt.dubboconsumertest.aaa.AnnoAction;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

public class ClientMain {
    public static void main(String[] args) throws IOException {
//        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
//                new String[] { "applicationConsumer.xml" });
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConsumerConfig.class);
        context.start();
        AnnoAction service = (AnnoAction) context.getBean("annoAction");
        System.out.println(service.sayHello("world"));
        System.in.read();
        context.close();
    }
}
